package cn.snowheart.factory.factorymethod;

import cn.snowheart.factory.component.AMDCPU;
import cn.snowheart.factory.component.AMDGPU;
import cn.snowheart.factory.component.Component;
import cn.snowheart.factory.enums.ComponentType;

/**
 * @author liuwanxiang
 * @version 2019/07/01
 */
public class AMDFactory implements ComponentMethodFactory {
    @Override
    public Component createComponent(ComponentType type) {
        Component component = null;
        if (ComponentType.CPU == type) {
            component = new AMDCPU();
        } else if (ComponentType.GPU == type) {
            component = new AMDGPU();
        }
        return component;
    }
}
